<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>7.滚动对定位元素的影响</title>
  <style>
    * {
      margin: 0;
      padding: 0;
    }
    article {
      width: 400px;
      height: 400px;
      border: solid 2px blueviolet;
      margin: 100px;
      position: relative;
      overflow:scroll;
      overflow-x: hidden;
    }

    section{
      width: 100%;
      height: 1000px;
      padding: 0px;
      background: #ddd;
    }

    div {
      background: red;
      height: 200px;
      width: 200px;
      position: absolute;
      left: 0;
      bottom: 0;
    }
  </style>
</head>

<body>
  <article>
    <section>

      <div></div>
    </section>
  </article>

</body>

</html>